package com.examp.flowable.listen;

import lombok.Setter;
import lombok.extern.slf4j.Slf4j;
import org.flowable.engine.delegate.DelegateExecution;
import org.flowable.engine.delegate.ExecutionListener;
import org.flowable.engine.impl.el.FixedValue;
import org.flowable.engine.impl.persistence.entity.ExecutionEntityImpl;

/**
 * 任务执行监听器
 *
 * @author Liu
 * @date 2025-09-10  23:14
 */
@Slf4j
public class TaskExecListener implements ExecutionListener {

    @Override
    public void notify(DelegateExecution delegateExecution) {
        log.info("任务执行监听器触发---------------------开始");
        ExecutionEntityImpl entity = (ExecutionEntityImpl) delegateExecution;
        log.info("执行节点事件名称: {}", entity.getEventName());
        log.info("执行节点名称: {}", entity.getActivityName());
        log.info("任务执行监听器触发---------------------结束");
    }
}
